enum PIN_DigitalRead {
    //% block="P5"
    D2,
    //% block="P4"
	D3,
    //% block="P3"
	D4,
    //% block="P2"
	D13,
    //% block="P1"
	D7
}


//% color="#ADD8E6" iconWidth=50 iconHeight=40
namespace button_b {
    //% block="按键连接[PINX]" blockType="command"
    //% PINX.shadow="dropdown" PINX.options="PIN_DigitalRead" 
    export function button(parameter: any, block: any) {
        let PINX = parameter.PINX.code;
        Generator.addCode(`pinMode(${PINX},INPUT);`);
    }
}